﻿using HiSport.Core.Entity.Pay;
using HiSport.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HiSport.Application.Service.Transaction.Pay.Dtos
{

    public class PayRecordDto
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        public long OrderId { get; set; }


        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNo { get; set; }


        /// <summary>
        /// 交易ID
        /// </summary>
        public string TransactionId { get; set; }


        /// <summary>
        /// 支付单号
        /// </summary>
        public string PayNo { get; set; }



        /// <summary>
        /// 支付金额
        /// </summary>
        public decimal PayAmount { get; set; }

        /// <summary>
        /// 支付记录状态
        /// </summary>
        public PayRecordStateEnum State { get; set; }

        /// <summary>
        /// 子订单Id
        /// </summary>
        public List<long>? OrderInfoId { get; set; }
    }

    /// <summary>
    /// 支付记录
    /// </summary>
    public class PayRecordCreateDto
    {
        
        /// <summary>
        /// 订单ID
        /// </summary>
        public long OrderId { get; set; }


        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNo { get; set; }


        /// <summary>
        /// 交易ID
        /// </summary>
        public string TransactionId { get; set; }


        /// <summary>
        /// 支付金额
        /// </summary>
        public decimal PayAmount { get; set; }

        /// <summary>
        /// 支付方式
        /// </summary>
        public PayTypeEnum PayType { get; set; }

    }

    /// <summary>
    /// 支付第三方记录
    /// </summary>
    public class PayTripartiteRecordCreateDto
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        public long PayRecordId { get; set; }

        /// <summary>
        /// 订单
        /// </summary>
        public long OrderId { get; set; }

        /// <summary>
        /// 请求
        /// </summary>
        public string Request { get; set; }

        /// <summary>
        /// 结果
        /// </summary>
        public string Result { get; set; }
    }


    public class PayRecordUpdateDto
    {

        public string  PayNo { get; set; }


        /// <summary>
        /// 交易ID
        /// </summary>
        public string TransactionId { get; set; }
    }
}
